package 第五周.homework;//Make up a factorial using by while circulation.
import java.util.Scanner;
public class factorial
{
  public static void main(String []args)
  {
   final int m = 1;
   int n, result = 1; 
   Scanner scan = new Scanner(System.in);

   System.out.println("Please enter n :");
   n = scan.nextInt();
   System.out.println("n =" +n);
   while(n >= m)
   {
     result *= n;
     n--;
   }  
   System.out.println("The result of factorial is :" + result);
 }
} 
